1. Field of the Invention
The present invention relates to an image processing apparatus, an image processing method of an image processing apparatus, and a program.
2. Description of the Related Art
A scaling process in a rendering process by an image processing apparatus is a process for increasing or reducing the resolution of an input image to a predetermined resolution. A compression process and a decompression process in the rendering process are processes for compressing intermediate data generated based on input data and decompressing the compressed intermediate data, respectively.
For example, Japanese Patent Application Laid-Open No. 10-313411 discusses the following method. A compression rate is determined, for example, based on an enlargement rate of image data. Then, the image data is lossy-compressed and is written into a buffer memory. The image data is enlarged to a rendering resolution after being read from the buffer memory and decompressed.
Japanese Patent Application Laid-Open No. 2008-072624 discusses the following method. Image data is lossless-compressed on a tile-by-tile basis to generate lossless compressed data. Herein, each tile is determined whether to be lossless-compressed or lossy-compressed based on an image data attribute, so that each tile is correlated with lossless or lossy determination information. Whenever the number of tiles determined to be lossy-compressed exceeds a threshold, lossless compressed data with lossy determination information is reduced to a low resolution. When lossless compression for one page is finished, the lossless compressed data with lossy determination information is lossy-compressed and replaced with lossy compressed data. After each of the lossless compressed data and the lossy compressed data is decompressed, the data is increased to a rendering resolution.
FIGS. 17 and 18 are diagrams illustrating examples of compression, decompression, and enlargement processes in a conventional manner. In FIG. 17A, image data is enlarged, lossy-compressed, and then decompressed. Consequently, a size of the compressed data increases. The larger the data size of the compressed data, the longer the transfer time. FIG. 17B illustrates one conventional method for dealing with a case where a data size of compressed data exceeds a limit. When the data size of the compressed data exceeds the limit, image data is once decompressed so that a corresponding page is rendered and lossy-compressed. According to such a method, one entire page is lossy-compressed, causing quality deterioration of an output image.
Consequently, a method for performing an enlargement process subsequent to a lossy compression process has been employed particularly by an image processing apparatus with limited buffer memory. For example, in FIG. 18, image data is lossy-compressed, decompressed, and then enlarged. Such a method can prevent an increase in size of the compressed data due to the enlargement. However, a noise deteriorating the image quality caused by the lossy compression is later amplified by the enlargement process. As a result, the quality of an output image is markedly deteriorated.